Added params argument for Labels and Search#1008
Added params argument for Labels and Search#1008Nyholm wants to merge 2 commits intoKnpLabs:masterfrom
Conversation
|
Why can't you use the lazy fetch method from the paginator, and only look at the first n things? |
|
I only need the first 100 results. I am not interested in creating a paginator when I dont need it. |
|
I've fixed the CS issues. This PR will make the Search and Labels API more consistent with other APIs. |
|
I'd recommend using |
|
Using
It would also lead to that user can send any valid parameter to the API server... I think that is a good feature for the API client. |
|
I also do not see any harm in adding this PR You can still document the alternative of a fetchAllLazy and how it works, its pros and cons etc, separately. |
|
While I think @GrahamCampbell is correct that we should point users to the On the points @Nyholm raised
|
I think that would be a nice idea. Maybe just call it |
|
I've stumbled upon this myself when trying to access subsequent pages of some GitHub API's within specific user web requests. I would expect to be able to query for a specific page (where I am entirely not interested in first couple pages). Otherwise I am required to perform http requests and iterate over results that I do not need. |
Since we cannot use
setPerPage()in 3.0, we need to be able to specify theper_pageparameter without using a pager.